import ref.User;
import org.apache.commons.lang3.RandomStringUtils;

import java.lang.reflect.Method;

public class APPWangYuyan {
    public static void main(String[] args) throws Exception{
//        String s = RandomStringUtils.randomAlphabetic(7);
//        System.out.println(s);

        //创建User类的实例
        /*User u = new User();
        u.setName("Timor");
        System.out.println(u.getName());
        u.setAge(20);
        System.out.println(u.getAge());*/

        Class<?> UU = Class.forName("cn.tedu.wyy.User");
        Object o = UU.newInstance();
        Method setName = UU.getMethod("setName", String.class);
        setName.invoke(o,"Jenkins");

        Method getName = UU.getMethod("getName");
        Object result = getName.invoke(o);
        System.out.println(result);



    }

    }

